package sso.config;


import org.springframework.context.annotation.Configuration;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import sso.interceptor.TokenInterceptor;

@Configuration
public class SpringWebConfig implements WebMvcConfigurer {

//将拦截器放天假到mvc的直行出
//new 一个我们的创建的拦截器 TokenInterceptor()
   @Override
   public void addInterceptors(InterceptorRegistry registry) {
      registry.addInterceptor(new TokenInterceptor())
              .addPathPatterns("/**");
   }
}
